package com.lmind.core.gps.terminal;

import com.lmind.core.gps.terminal.message.AbstractMessage;

/**
 * 终端网关
 * 1.接受终端的连接请求，并保持会话状态
 * 2.向终端发送和接受消息
 * @author 刘勉
 *
 */
public interface TerminalGateway {
	
	void addTerminalGatewayListener(TerminalGatewayListener listener);
	
	void removeTerminalGatewayListener(TerminalGatewayListener listener);
	
	Object getAttribute(long sessionId, Object key);
	
	void setAttribute(long sessionId, Object key, Object value);
	
	/**
	 * 向一个终端会话发送消息
	 * @param message
	 */
	void sendMessage(long sessionId, Object message);
}
